package com.lgx.mall.basic.entity;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.lgx.common.entity.IdGenerator;

/**
 * 商品属性
 * 
 * @author hez
 *
 */
@Entity
@Table(name = "TM_PRODUCTPROPERTY")
public class ProductProperty implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.TABLE,generator=IdGenerator.PRODUCTPROPERTY_ID_GENERATOR)
	@TableGenerator(
			name = IdGenerator.PRODUCTPROPERTY_ID_GENERATOR,
			table = IdGenerator.GENERATOR_TABLE,
			pkColumnName = IdGenerator.GEN_NAME,
			pkColumnValue = IdGenerator.PRODUCTPROPERTY_ID_GENERATOR,
			valueColumnName = IdGenerator.GEN_VALUE,
			initialValue = 1,
			allocationSize = 1
	)
	private Long id;
	
	@ManyToOne
	@JoinColumn(name = "category_id")
	private ProductPropertyCategory category;
	
	private String value;
	
	private String isDelete;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public ProductPropertyCategory getCategory() {
		return category;
	}

	public void setCategory(ProductPropertyCategory category) {
		this.category = category;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(String isDelete) {
		this.isDelete = isDelete;
	}

}
